<?php
/*=======================================================================
 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
 =======================================================================*/

include_once(NUKE_BASE_DIR.'header.php');
include_once('modules/'.$module_name.'/admin/UploadMenu.php');
OpenTable();
echo"<h1><u>Usergroup restrictions:</u></h1>
<p>Check the usergroups that are allowed to upload.<br/><font size='1'>by default after the install all usergroups will be unchecked</font></p>";
$result = $db->sql_query("SELECT * FROM " . $prefix . "_bbgroups WHERE group_single_user='0'");
echo"<form action=\"".$admin_file.".php?op=Uploadusergroups_save\" method=\"post\" name=\"uploadusergroup\" id=\"uploadusergroup\">
<table cellspacing=\"5\" cellpadding=\"5\" border=\"0\" >";
$result = $db->sql_query("SELECT group_id, group_name,group_description,img_allow FROM " . $prefix . "_bbgroups WHERE group_single_user='0'");
while(list($group_id, $group_name,$group_description,$img_allow)=mysql_fetch_row($result))
{  
	$checked = ($img_allow == 1) ? 'checked="checked"' : '';  
	echo '<tr>
			<td><strong>'.$group_name.'</strong><br />'.$group_description.'</td>
			<td><input type="checkbox" name="img_allow[]" value='.$group_id.' '.$checked.'/></td>
		  </tr>';  
}  
echo"
<tr>
	<td>
		<input type=\"submit\" name=\"Submit\" value=\"Update Privileges\" />
	</td>
</tr>
</form></table>";

CloseTable();
include_once(NUKE_BASE_DIR.'footer.php');

 ?>